//
//  MyCell.m
//  WanCaiC8
//
//  Created by tangang on 2017/12/29.
//  Copyright © 2017年 tangang. All rights reserved.
//

#import "MyCell.h"

@implementation MyCell{
    QXLable     *labTitle;
    UIView      *line;
    QXLable      *labNum;
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self=[super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        WS(weakSelf);
        labTitle=[[QXLable alloc]initWithBFount:15];
        
        [self.contentView addSubview:labTitle];
        [labTitle mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.equalTo(self.contentView);
            make.left.equalTo(self.contentView).with.offset(real_size(10));
            make.height.mas_equalTo(@(real_size(72)));
        }];
        
        line=[[UIView alloc]init];
        line.backgroundColor=DEFAULTBGCOLOR;
        [self.contentView addSubview:line];
        [line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(labTitle);
            make.bottom.right.equalTo(weakSelf.contentView);
            make.height.mas_equalTo(@.7);
        }];
        
        UIImageView *imageArrow=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"arrow_right"]];
        [self.contentView addSubview:imageArrow];
        [imageArrow mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.contentView);
            make.right.equalTo(self.contentView).with.offset(-10);
            make.size.mas_equalTo(imageArrow.image.size);
        }];
        
        labNum=[[QXLable alloc]initWithBFount:15];
        labNum.textColor=DEFAULTORANGECOLOR;
        labNum.textAlignment=NSTextAlignmentRight;
        [self.contentView addSubview:labNum];
        [labNum mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self.contentView);
            make.right.equalTo(imageArrow.mas_left).with.offset(real_size(-10));
        }];
    }
    return self;
}

- (void)setDict:(NSDictionary *)dict andNum:(NSString *)num{
    labTitle.text=[dict objectForKey:@"title"];
    labNum.text=num;
}



@end
